﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MyBet.Web
{
    public partial class ParieurPro : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            var useragent = Request.UserAgent;
            var isAndroid = false;

            if (useragent != null)
            {
                if (useragent.ToLower().Contains("android"))
                {
                    isAndroid = true;
                }
            }

            if ((Request.Browser.IsMobileDevice) || (isAndroid))
            {
                // C'est un téléphone mobile => on redirige vers le site optimisé
                Response.Redirect("~/iPhoneLogin.aspx");
            }
        }
    }
}